package com.bestow.lease.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.lease.mapper.HlsBpMasterAddressMapper;
import com.bestow.lease.domain.HlsBpMasterAddress;
import com.bestow.lease.service.IHlsBpMasterAddressService;

/**
 * 商业伙伴地址信息Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-26
 */
@Service
public class HlsBpMasterAddressServiceImpl implements IHlsBpMasterAddressService 
{
    @Autowired
    private HlsBpMasterAddressMapper hlsBpMasterAddressMapper;

    /**
     * 查询商业伙伴地址信息
     * 
     * @param addressId 商业伙伴地址信息主键
     * @return 商业伙伴地址信息
     */
    @Override
    public HlsBpMasterAddress selectHlsBpMasterAddressByAddressId(Long addressId)
    {
        return hlsBpMasterAddressMapper.selectHlsBpMasterAddressByAddressId(addressId);
    }

    /**
     * 查询商业伙伴地址信息列表
     * 
     * @param hlsBpMasterAddress 商业伙伴地址信息
     * @return 商业伙伴地址信息
     */
    @Override
    public List<HlsBpMasterAddress> selectHlsBpMasterAddressList(HlsBpMasterAddress hlsBpMasterAddress)
    {
        return hlsBpMasterAddressMapper.selectHlsBpMasterAddressList(hlsBpMasterAddress);
    }

    /**
     * 新增商业伙伴地址信息
     * 
     * @param hlsBpMasterAddress 商业伙伴地址信息
     * @return 结果
     */
    @Override
    public int insertHlsBpMasterAddress(HlsBpMasterAddress hlsBpMasterAddress)
    {
        hlsBpMasterAddress.setCreateTime(DateUtils.getNowDate());
        return hlsBpMasterAddressMapper.insertHlsBpMasterAddress(hlsBpMasterAddress);
    }

    /**
     * 修改商业伙伴地址信息
     * 
     * @param hlsBpMasterAddress 商业伙伴地址信息
     * @return 结果
     */
    @Override
    public int updateHlsBpMasterAddress(HlsBpMasterAddress hlsBpMasterAddress)
    {
        hlsBpMasterAddress.setUpdateTime(DateUtils.getNowDate());
        return hlsBpMasterAddressMapper.updateHlsBpMasterAddress(hlsBpMasterAddress);
    }

    /**
     * 批量删除商业伙伴地址信息
     * 
     * @param addressIds 需要删除的商业伙伴地址信息主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpMasterAddressByAddressIds(Long[] addressIds)
    {
        return hlsBpMasterAddressMapper.deleteHlsBpMasterAddressByAddressIds(addressIds);
    }

    /**
     * 删除商业伙伴地址信息信息
     * 
     * @param addressId 商业伙伴地址信息主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpMasterAddressByAddressId(Long addressId)
    {
        return hlsBpMasterAddressMapper.deleteHlsBpMasterAddressByAddressId(addressId);
    }
}
